<?php if(!class_exists('raintpl')){exit;}?><?php $tpl = new RainTPL;$tpl_dir_temp = self::$tpl_dir;$tpl->assign( $this->var );$tpl->draw( dirname("header") . ( substr("header",-1,1) != "/" ? "/" : "" ) . basename("header") );?>

<?php echo aw_showcase(); ?>

<div class ="wrapper">

	<div class = "main" id = "shop">
		<h1 class = "fr"><?php echo $e['shop-facilities'];?></h1>

		<div class = "content">

			<div class="gallery">
				<?php $counter1=-1; if( isset($all_picture) && is_array($all_picture) && sizeof($all_picture) ) foreach( $all_picture as $key1 => $value1 ){ $counter1++; ?>
				<div class="showcase-slide">
					<div class="showcase-content">
						<img src = "<?php echo $value1["image"];?>" />
					</div>
					<div class="showcase-thumbnail">
						<img src = "<?php echo $value1["thumb"];?>" />
					</div>
				</div>
				<?php } ?>
			</div>

			<img src = "<?php echo $shop["logo"];?>" class = "shop-logo">

			<span class = "detail">
				<?php echo $shop["detail"];?>
			</span>

		</div>
	</div>

	<div class = "sidebar">
		<ul>
			<li class = ""><?php echo $e['shop-facilities2'];?></li>
			<?php $counter1=-1; if( isset($all_shop) && is_array($all_shop) && sizeof($all_shop) ) foreach( $all_shop as $key1 => $value1 ){ $counter1++; ?>
				<li><a href = "shop.html?gid=<?php echo $value1["gid"];?>"><?php echo $value1["shop"];?></a></li>
			<?php } ?>
		</ul>
	</div>
</div>

<script>

$(document).ready(function(){
	$(".gallery").awShowcase({
		content_width:			680,
		content_height:			400,
		fit_to_parent:			false,
		auto:					true,
		interval:				3000,
		continuous:				false,
		loading:				true,
		arrows:					true,
		buttons:				false,
		keybord_keys:			true,
		pauseonover:			true,
		stoponclick:			true,
		transition:				'fade', /* hslide/vslide/fade */
		transition_delay:		300,
		transition_speed:		500,
		thumbnails:				true,
		thumbnails_position:	'outside-last', /* outside-last/outside-first/inside-last/inside-first */
		thumbnails_direction:	'horizontal', /* vertical/horizontal */
		thumbnails_slidex:		0, /* 0 = auto / 1 = slide one thumbnail / 2 = slide two thumbnails / etc. */
		dynamic_height:			false, /* For dynamic height to work in webkit you need to set the width and height of images in the source. Usually works to only set the dimension of the first slide in the showcase. */
		speed_change:			false, /* Set to true to prevent users from swithing more then one slide at once. */
		viewline:				false, /* If set to true content_width, thumbnails, transition and dynamic_height will be disabled. As for dynamic height you need to set the width and height of images in the source. */
		custom_function : opengraph
	});

	function opengraph(){
		setTimeout(makerect, 200);
	}

	$(".showcase-content-container").before("<div class = 'rect' style = 'position:absolute; z-index:-1;'></div>");

	makerect();

	function makerect(){
		$(".rect").height($(".showcase-content").last().find("img").height());
		var w = $(".showcase-content").last().find("img").width();
		$(".rect").width(w);
		$(".rect").css("margin-left", (680 - w)/2);
	}
});
</script>

<?php $tpl = new RainTPL;$tpl_dir_temp = self::$tpl_dir;$tpl->assign( $this->var );$tpl->draw( dirname("footer") . ( substr("footer",-1,1) != "/" ? "/" : "" ) . basename("footer") );?>